import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

// 引入tabbar所有的组件包
import HomeContainer from '../components/tabbar/HomeContainer.vue'
import MemberContainer from '../components/tabbar/MemberContainer.vue'
import SearchContainer from '../components/tabbar/SearchContainer.vue'
import ShopContainer from '../components/tabbar/ShopContainer.vue'
import newsInfo from '../components/news/newsInfo.vue'
import PhotoList from '../components/photos/photoList.vue'
import photoInfo from '../components/photos/photoInfo.vue'
import goodsList from '../components/goods/goodsList.vue'
import goodsInfo from '../components/goods/goodsInfo.vue'
import goodsDesc from '../components/goods/goodsDesc.vue'
import goodscomment from '../components/goods/goodscomment.vue'

// 引入newList的组件包
import newListContent from '../components/news/newListContent.vue'


export default new Router({
  routes: [
    {path:'/', component: HomeContainer},
    {path:'/home', component: HomeContainer},
    {path:'/member', component: MemberContainer},
    {path:'/shopcart', component: ShopContainer},
    {path:'/search', component: SearchContainer},
    {path:'/home/newList', component: newListContent},
    {path:'/home/newsInfo/:id', component: newsInfo},
    // {path:'/home/newsInfo', component: newsInfo}
    {path:'/home/photoList', component: PhotoList},
    {path:'/home/photoInfo/:id', component: photoInfo},
    {path:'/home/goodsList', component: goodsList},
    // {path:'/home/goodsInfo/:id', component: goodsInfo}
    // {path:'/home/goodsInfo', component: goodsInfo}
    {path:'/home/goodsInfo', component: goodsInfo, name: '/home/goodsInfo'},
    {path:'/home/goodsDesc/:id', component: goodsDesc, name: 'goodsDesc'},
    {path:'/home/goodscomment/:id', component: goodscomment, name: 'goodscomment'}
  ],
  linkActiveClass: 'mui-active'
})
